import request from '/src/utils/request'

const listParam = {
    sort: 'DUE_DILIGENCE_REPORT_TEMP',
    page: 1,
    size: 100
}

export function List() {
    return request({
        url: "/config",
        method: "get",
        params: {
            sort: 'DUE_DILIGENCE_REPORT_TEMP',
            page: 1,
            size: 100
        }
    });
}

export function GetDueDiligenceTemplateTypes() {
    return request({
        url: "/dataDictionary",
        method: "get",
        params: {
            sort: 'DUE_DILIGENCE_TEMLATE',
            page: 1,
            size: 100
        }
    });
}

export function SaveItem(item) {
    return request.post("/config", item);
}

export function GetById(id) {
    return request.get("/config/"+id)
}

export function UpdateConfig(item) {
    return request.put("/config", item)
}

export function DeleteConfig(id) {
    return request.delete("/config/"+id)
}